import { http } from "@/utils/http";
import type { ApiResponse } from "./user";

export interface MenuResponse {
  profile?: Record<string, any>;
  roles?: Array<string>;
  permissions?: Array<string>;
  menus: Array<any>;
}

export type RouteResult = ApiResponse<MenuResponse>;

export const getAsyncRoutes = () => {
  return http.request<RouteResult>("get", "/auth/menus");
};
